<script setup lang="ts">
import { reactive, ref } from 'vue'
// 定义响应式数据
// ref
// const 变量名=ref(值)
// const num = ref<值的类型>(值)
const num = ref<0 | 1>(0)
console.log(num)
// reactive
// const state=reactive(复杂数据类型)
// const state = reactive<{ username: string }>({ username: '张三' })
const state: { username: string } = reactive({ username: '张三' })
console.log(state)
</script>

<template>
  <div class="home-page">home</div>
</template>

<style scoped></style>
